function createAnimation(options) {
  var from = options.from; //
  var to = options.to;
  var totalMS = options.totalMS || 1000;
  var duration = options.duration || 15;

  var times = Math.floor(totalMS / duration); // 变化的次数
  var dis = (to - from) / times; // 每次变化的量
  var curTimes = 0;
  // 开始计时器，缓慢增加scrollTop
  var timer = setInterval(function () {
    from += dis;
    curTimes++;
    if (curTimes >= times) {
      from = to;
      clearInterval(timer);
      options.onEnd && options.onEnd();
    }
    options.onMove && options.onMove(from);
  }, duration);
}
